import 'package:boss/models/store_message.dart';
import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/widget/radioList/radio.dart' as radio;
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';

class StoreRow extends StatelessWidget {
  final StoreMessage store;
  final bool isSelected;
  final VoidCallback onTap;

  const StoreRow({this.store, this.isSelected = false, this.onTap, Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      behavior: HitTestBehavior.translucent,
      child: Container(
        height: 110.w,
        child: Row(
          children: <Widget>[
            radio.Radio(
              isSelected: isSelected,
            ),
            Expanded(
              child: Padding(
                padding: EdgeInsets.only(
                  left: 20.w,
                ),
                child: Text(
                  '(${store.storeNo})    ${store.storeName}',
                  style: TextStyleConstant().normal_1_32,
                  overflow: TextOverflow.ellipsis,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
